package com.qf.service.serviceImpl;

import com.qf.dao.ProfileDao;
import com.qf.dao.daoImpl.ProfileDaoImpl;
import com.qf.pojo.Page;
import com.qf.pojo.Profile;
import com.qf.service.ProfileService;

import java.util.List;

public class ProfileServiceImpl implements ProfileService {
    ProfileDao profileDao = new ProfileDaoImpl();

    @Override
    public List<Profile> FindAll() {
        List<Profile> profiles = profileDao.findAll();

        return profiles;
    }

    @Override
    public Profile findProfileById(int id) {
        Profile profile = profileDao.findOneById(id);
        return profile;
    }

    @Override
    public int update(int id, Profile profile) {
        int update = profileDao.update(id, profile);
        return update;
    }

    @Override
    public int findAllPageCount() {
        return profileDao.selectAllByPageCount();
    }

    @Override
    public List<Profile> findAllPage(Page page) {
        return profileDao.selectAllByPage(page);
    }


}
